package com.kfpanda.search.action.searchmg;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.kfpanda.search.action.BaseAction;
import com.kfpanda.search.action.ResultAction;
import com.kfpanda.search.biz.searchmg.IndexBIZ;

@Repository
@Controller
@Scope("prototype")
public class IndexAction extends BaseAction {
	
	@Resource
	private IndexBIZ indexBIZ;
	
	@RequestMapping("/search/index/add.htm")
	public String indexAdd(@RequestParam String filePath){
		indexBIZ.indexCreate(filePath);
		return ResultAction.SUCCESS_VIEW;
	}
}
